package com.atguigu.jxc.controller;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.OverflowList;
import com.atguigu.jxc.service.OverflowService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping
public class OverflowController {
    @Autowired
    private OverflowService overflowService;
    @PostMapping("/overflowListGoods/save")
    public ServiceVO overflowListGoods(OverflowList overflowList, String overflowListGoodsStr){
      return overflowService.overflowListGoods(overflowList, overflowListGoodsStr);

    }

    //查询报溢列表
    @PostMapping("/overflowListGoods/list")
    public Map<String,Object> overflowList(String  sTime, String  eTime){
        return overflowService.overflowList(sTime,eTime);
    }

    //查询报溢商品列表
    @PostMapping("/overflowListGoods/goodsList")
    public Map<String,Object> overflowListGoods(Integer overflowListId){
      return   overflowService.overflowListGoodsList(overflowListId);
    }
}
